package com.zcy.tag;

import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.TagSupport;

public class LoginDateTag extends TagSupport {

	@Override
	public int doStartTag() throws JspException {
		SimpleDateFormat simple=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 
    	String dateStr=simple.format(new Date());
    	
    	try {
			pageContext.getOut().print(dateStr);
		} catch (IOException e) {
			e.printStackTrace();
		}
		return super.doStartTag();
	}

}
